]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
build: Replace array with dict
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 31 Jan 2022 22:55:57 +0000 (23:55 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 4 Feb 2022 13:59:20 +0000 (13:59 +0000)
It's more readable than "magic" indexes, and makes it easier to
provide fallback values for optional entries.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2141>

data/meson.build

index 76ae45c93a9671cf11c13d0da8b55de889f1cae7..c4264e015cd88cc0c8e142b36193969ef928be00 100644 (file)
@@ -48,16 +48,19 @@ subdir('icons')
 subdir('theme')
 
 data_resources = [
-  ['dbus-interfaces', []],
-  ['osk-layouts', []],
-  ['theme', theme_deps]
+  {'name': 'dbus-interfaces'},
+  {'name': 'osk-layouts'},
+  {'name': 'theme', 'deps': theme_deps}
 ]
 foreach resource : data_resources
+  name = resource.get('name')
+  deps = resource.get('deps', [])
+
   gnome.compile_resources(
-    'gnome-shell-' + resource[0],
-    'gnome-shell-@0@.gresource.xml'.format(resource[0]),
-    source_dir: resource[0],
-    dependencies: resource[1],
+    'gnome-shell-' + name,
+    'gnome-shell-@0@.gresource.xml'.format(name),
+    source_dir: name,
+    dependencies: deps,
     gresource_bundle: true,
     install: true,
     install_dir: pkgdatadir